package org.example.controller;

import lombok.RequiredArgsConstructor;
import org.example.domain.ResponseResult;
import org.example.service.TagService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/tag")
@RequiredArgsConstructor
public class TagController {

    private final TagService tagService;


    @PreAuthorize("@ps.hasPermission('sys:user')")
    @GetMapping("/list")
    public ResponseResult list(){

        return tagService.list();
    }
}
